package com.grace.portal.entity;

import java.io.Serializable;
import java.util.List;

import org.codehaus.jackson.annotate.JsonProperty;
import org.codehaus.jackson.map.annotate.JsonSerialize;

//如果设置了该属性，默认不输出null的字段
@JsonSerialize(include=JsonSerialize.Inclusion.NON_DEFAULT)
@SuppressWarnings("serial")
public class WxMenu implements Serializable {

	private Long id; // 主键
	private String type; // 菜单的响应动作类型，目前有click、view两种类型
	private String name; // 是,菜单标题，不超过16个字节，子菜单不超过40个字节
	private String key; // click类型必须,菜单KEY值，用于消息接口推送，不超过128字节
	private String url; // view类型必须,网页链接，用户点击菜单可打开链接，不超过256字节
	private List<WxMenu> subMenu; // 否,二级菜单数组，个数应为1~5个

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getKey() {
		return key;
	}

	public void setKey(String key) {
		this.key = key;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}
	
	@JsonProperty("sub_button")
	public List<WxMenu> getSubMenu() {
		return subMenu;
	}

	public void setSubMenu(List<WxMenu> subMenu) {
		this.subMenu = subMenu;
	}

}
